package com.health.teahouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.health.teahouse.mapper.RecipesMapper;
import com.health.teahouse.domain.Recipes;
import com.health.teahouse.service.IRecipesService;

/**
 * 菜谱管理Service业务层处理
 * 
 * @author yang
 * @date 2024-01-10
 */
@Service
public class RecipesServiceImpl implements IRecipesService 
{
    @Autowired
    private RecipesMapper recipesMapper;

    /**
     * 查询菜谱管理
     * 
     * @param recipeId 菜谱管理主键
     * @return 菜谱管理
     */
    @Override
    public Recipes selectRecipesByRecipeId(Long recipeId)
    {
        return recipesMapper.selectRecipesByRecipeId(recipeId);
    }

    /**
     * 查询菜谱管理列表
     * 
     * @param recipes 菜谱管理
     * @return 菜谱管理
     */
    @Override
    public List<Recipes> selectRecipesList(Recipes recipes)
    {
        return recipesMapper.selectRecipesList(recipes);
    }

    /**
     * 新增菜谱管理
     * 
     * @param recipes 菜谱管理
     * @return 结果
     */
    @Override
    public int insertRecipes(Recipes recipes)
    {
        return recipesMapper.insertRecipes(recipes);
    }

    /**
     * 修改菜谱管理
     * 
     * @param recipes 菜谱管理
     * @return 结果
     */
    @Override
    public int updateRecipes(Recipes recipes)
    {
        return recipesMapper.updateRecipes(recipes);
    }

    /**
     * 批量删除菜谱管理
     * 
     * @param recipeIds 需要删除的菜谱管理主键
     * @return 结果
     */
    @Override
    public int deleteRecipesByRecipeIds(Long[] recipeIds)
    {
        return recipesMapper.deleteRecipesByRecipeIds(recipeIds);
    }

    /**
     * 删除菜谱管理信息
     * 
     * @param recipeId 菜谱管理主键
     * @return 结果
     */
    @Override
    public int deleteRecipesByRecipeId(Long recipeId)
    {
        return recipesMapper.deleteRecipesByRecipeId(recipeId);
    }
}
